import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import './myFont.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
          colorScheme: const ColorScheme(
              primary: Colors.black,
              surfaceVariant: Colors.white,
              secondary: Colors.green,
              background: Colors.white, //整个页面背景色
              error: Colors.red,
              brightness: Brightness.light,
              onBackground: Colors.pink,
              outlineVariant: Colors.white,
              onError: Colors.yellow,
              onPrimary: Colors.white, //字体颜色
              onSecondary: Colors.redAccent,
              onSurface: Colors.yellowAccent,
              surface: CupertinoColors.activeOrange) //整个标题栏颜色
          // primarySwatch: Colors.blue, // 设置主色调,无效，怎么设都是白色
          ),
      home: Scaffold(
        appBar: AppBar(title: const Text("图标"), centerTitle: true),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return const Column(
      children: [
        SizedBox(height: 20),
        Icon(Icons.home, size: 40, color: Colors.green),
        SizedBox(height: 20),
        Icon(Icons.abc_outlined, size: 40, color: Colors.red),
        SizedBox(height: 20),
        Icon(Icons.auto_fix_high_rounded, size: 40, color: Colors.blue),
        SizedBox(height: 20),
        Icon(Icons.edit_document, size: 60, color: Colors.pink),
        SizedBox(height: 20),
        Icon(MyFont.data, size: 40, color: Colors.orangeAccent),
        SizedBox(height: 20),
        Icon(MyFont.file, size: 40, color: Colors.blueGrey),
        SizedBox(height: 20),
        Icon(MyFont.sword, size: 40, color: Color.fromARGB(255, 57, 187, 220)),
        SizedBox(height: 20),
        Icon(MyFont.eat, size: 40, color: Color.fromARGB(255, 71, 220, 57)),
        SizedBox(height: 20),
        Icon(MyFont.search, size: 40, color: Color.fromARGB(255, 71, 220, 57)),
        SizedBox(height: 20),
        Icon(MyFont.up, size: 40, color: Color.fromARGB(255, 71, 220, 57)),
        SizedBox(height: 20),
        Icon(MyFont.highlight,
            size: 40, color: Color.fromARGB(255, 71, 220, 57)),
        SizedBox(height: 20),
        Icon(MyFont.sushi, size: 40, color: Color.fromARGB(255, 71, 220, 57)),
        SizedBox(height: 20),
        Icon(MyFont.hill, size: 40, color: Color.fromARGB(255, 71, 220, 57)),
      ],
    );
  }
}
